import '../apis/resquest/http.dart';
import '../model/bean/latest_analysis_bean.dart';
import '../model/bean/latest_raw_data_bean.dart';

class Analysis {
  /// 查询电梯运行统计数据
  /// * [data] Map|请求参数|必填
  static queryLatestAnalysis(Map<String, dynamic> data) async {
    const url = '/elevator-maintenance-app/analysis/getLatestAnalysisData';
    try {
      HttpResponse _r = await Http.getInstance().get(url, params: data);
      return LatestAnalysisBean.fromJson(_r.data);
    } catch (e) {}
  }

  /// 查询电梯最新原始数据
  /// * [data] Map|请求参数|必填
  static queryLatestRawData(Map<String, dynamic> data) async {
    const url = '/elevator-maintenance-app/analysis/getLatestRawData';
    try {
      HttpResponse _r = await Http.getInstance().get(url, params: data);
      return LatestRawDataBean.fromJson(_r.data);
    } catch (e) {}
  }
}
